package com.zysstudy.designmode;

/**
 * @author zhaoyoushui
 * @date 2024/4/26 11:28
 * @Description
 * @Copyright 南京优通信息科技股份有限公司
 */
public class Dog extends Animal{

    private String name;

    public  Dog(String name){
        this.name = name;
    }
    @Override
    public String getName(){
        return this.name;
    }

    public void setName(String name){
        this.name = name;
    }

    public void play(){
        System.out.println("小狗"+this.name+"在做游戏");
    }
}
